\(\int (c+d x)^2 \cot (a+b x) \csc ^2(a+b x) \, dx\) [48]
Optimal result
Integrand size = 22, antiderivative size = 54 \[
\int (c+d x)^2 \cot (a+b x) \csc ^2(a+b x) \, dx=-\frac {d (c+d x) \cot (a+b x)}{b^2}-\frac {(c+d x)^2 \csc ^2(a+b x)}{2 b}+\frac {d^2 \log (\sin (a+b x))}{b^3}
\]
[Out]
-d*(d*x+c)*cot(b*x+a)/b^2-1/2*(d*x+c)^2*csc(b*x+a)^2/b+d^2*ln(sin(b*x+a))/b^3
Rubi [A] (verified)
Time = 0.07 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.00, number of
steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {4495, 4269, 3556}
\[
\int (c+d x)^2 \cot (a+b x) \csc ^2(a+b x) \, dx=\frac {d^2 \log (\sin (a+b x))}{b^3}-\frac {d (c+d x) \cot (a+b x)}{b^2}-\frac {(c+d x)^2 \csc ^2(a+b x)}{2 b}
\]
[In]
Int[(c + d*x)^2*Cot[a + b*x]*Csc[a + b*x]^2,x]
[Out]
-((d*(c + d*x)*Cot[a + b*x])/b^2) - ((c + d*x)^2*Csc[a + b*x]^2)/(2*b) + (d^2*Log[Sin[a + b*x]])/b^3
Rule 3556
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]
Rule 4269
Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(c + d*x)^m)*(Cot[e + f*x]/f), x
] + Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Rule 4495
Int[Cot[(a_.) + (b_.)*(x_)]^(p_.)*Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[
(-(c + d*x)^m)*(Csc[a + b*x]^n/(b*n)), x] + Dist[d*(m/(b*n)), Int[(c + d*x)^(m - 1)*Csc[a + b*x]^n, x], x] /;
FreeQ[{a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]
Rubi steps \begin{align*}
\text {integral}& = -\frac {(c+d x)^2 \csc ^2(a+b x)}{2 b}+\frac {d \int (c+d x) \csc ^2(a+b x) \, dx}{b} \\ & = -\frac {d (c+d x) \cot (a+b x)}{b^2}-\frac {(c+d x)^2 \csc ^2(a+b x)}{2 b}+\frac {d^2 \int \cot (a+b x) \, dx}{b^2} \\ & = -\frac {d (c+d x) \cot (a+b x)}{b^2}-\frac {(c+d x)^2 \csc ^2(a+b x)}{2 b}+\frac {d^2 \log (\sin (a+b x))}{b^3} \\
\end{align*}
Mathematica [C] (verified)
Result contains complex when optimal does not.
Time = 1.06 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.74
\[
\int (c+d x)^2 \cot (a+b x) \csc ^2(a+b x) \, dx=\frac {2 i b d^2 x-2 i d^2 \arctan (\tan (a+b x))-2 b d^2 x \cot (a)-b^2 (c+d x)^2 \csc ^2(a+b x)+d^2 \log \left (\sin ^2(a+b x)\right )+2 b d (c+d x) \csc (a) \csc (a+b x) \sin (b x)}{2 b^3}
\]
[In]
Integrate[(c + d*x)^2*Cot[a + b*x]*Csc[a + b*x]^2,x]
[Out]
((2*I)*b*d^2*x - (2*I)*d^2*ArcTan[Tan[a + b*x]] - 2*b*d^2*x*Cot[a] - b^2*(c + d*x)^2*Csc[a + b*x]^2 + d^2*Log[
Sin[a + b*x]^2] + 2*b*d*(c + d*x)*Csc[a]*Csc[a + b*x]*Sin[b*x])/(2*b^3)
Maple [B] (verified)
Leaf count of result is larger than twice the leaf count of optimal. \(135\) vs. \(2(52)=104\).
Time = 1.31 (sec) , antiderivative size = 136, normalized size of antiderivative = 2.52
| | |
method | result | size |
| | |
parallelrisch |
\(\frac {-8 \ln \left (\sec \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}\right ) d^{2}+8 \ln \left (\tan \left (\frac {a}{2}+\frac {x b}{2}\right )\right ) d^{2}-b \left (b \left (d x +c \right )^{2} \cot \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}+\left (4 d^{2} x +4 c d \right ) \cot \left (\frac {a}{2}+\frac {x b}{2}\right )+b \left (d x +c \right )^{2} \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}+\left (-4 d^{2} x -4 c d \right ) \tan \left (\frac {a}{2}+\frac {x b}{2}\right )+4 b \left (\frac {d x}{2}+c \right ) x d \right )}{8 b^{3}}\) |
\(136\) |
risch |
\(-\frac {2 i d^{2} x}{b^{2}}-\frac {2 i d^{2} a}{b^{3}}+\frac {2 b \,d^{2} x^{2} {\mathrm e}^{2 i \left (x b +a \right )}+4 b c d x \,{\mathrm e}^{2 i \left (x b +a \right )}+2 b \,c^{2} {\mathrm e}^{2 i \left (x b +a \right )}-2 i d^{2} x \,{\mathrm e}^{2 i \left (x b +a \right )}-2 i c d \,{\mathrm e}^{2 i \left (x b +a \right )}+2 i d^{2} x +2 i d c}{b^{2} \left ({\mathrm e}^{2 i \left (x b +a \right )}-1\right )^{2}}+\frac {d^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}-1\right )}{b^{3}}\) |
\(148\) |
derivativedivides |
\(\frac {-\frac {a^{2} d^{2}}{2 b^{2} \sin \left (x b +a \right )^{2}}+\frac {a c d}{b \sin \left (x b +a \right )^{2}}-\frac {2 a \,d^{2} \left (-\frac {x b +a}{2 \sin \left (x b +a \right )^{2}}-\frac {\cot \left (x b +a \right )}{2}\right )}{b^{2}}-\frac {c^{2}}{2 \sin \left (x b +a \right )^{2}}+\frac {2 c d \left (-\frac {x b +a}{2 \sin \left (x b +a \right )^{2}}-\frac {\cot \left (x b +a \right )}{2}\right )}{b}+\frac {d^{2} \left (-\frac {\left (x b +a \right )^{2}}{2 \sin \left (x b +a \right )^{2}}-\left (x b +a \right ) \cot \left (x b +a \right )+\ln \left (\sin \left (x b +a \right )\right )\right )}{b^{2}}}{b}\) |
\(162\) |
default |
\(\frac {-\frac {a^{2} d^{2}}{2 b^{2} \sin \left (x b +a \right )^{2}}+\frac {a c d}{b \sin \left (x b +a \right )^{2}}-\frac {2 a \,d^{2} \left (-\frac {x b +a}{2 \sin \left (x b +a \right )^{2}}-\frac {\cot \left (x b +a \right )}{2}\right )}{b^{2}}-\frac {c^{2}}{2 \sin \left (x b +a \right )^{2}}+\frac {2 c d \left (-\frac {x b +a}{2 \sin \left (x b +a \right )^{2}}-\frac {\cot \left (x b +a \right )}{2}\right )}{b}+\frac {d^{2} \left (-\frac {\left (x b +a \right )^{2}}{2 \sin \left (x b +a \right )^{2}}-\left (x b +a \right ) \cot \left (x b +a \right )+\ln \left (\sin \left (x b +a \right )\right )\right )}{b^{2}}}{b}\) |
\(162\) |
norman |
\(\frac {-\frac {c^{2}}{8 b}-\frac {c^{2} \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{4}}{8 b}-\frac {d^{2} x^{2}}{8 b}-\frac {c d \tan \left (\frac {a}{2}+\frac {x b}{2}\right )}{2 b^{2}}+\frac {c d \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{3}}{2 b^{2}}-\frac {c d x}{4 b}-\frac {d^{2} x \tan \left (\frac {a}{2}+\frac {x b}{2}\right )}{2 b^{2}}+\frac {d^{2} x \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{3}}{2 b^{2}}-\frac {d^{2} x^{2} \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}}{4 b}-\frac {d^{2} x^{2} \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{4}}{8 b}-\frac {c d x \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}}{2 b}-\frac {c d x \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{4}}{4 b}}{\tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}}+\frac {d^{2} \ln \left (\tan \left (\frac {a}{2}+\frac {x b}{2}\right )\right )}{b^{3}}-\frac {d^{2} \ln \left (1+\tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}\right )}{b^{3}}\) |
\(254\) |
| | |
|
|
|
[In]
int((d*x+c)^2*cos(b*x+a)*csc(b*x+a)^3,x,method=_RETURNVERBOSE)
[Out]
1/8*(-8*ln(sec(1/2*a+1/2*x*b)^2)*d^2+8*ln(tan(1/2*a+1/2*x*b))*d^2-b*(b*(d*x+c)^2*cot(1/2*a+1/2*x*b)^2+(4*d^2*x
+4*c*d)*cot(1/2*a+1/2*x*b)+b*(d*x+c)^2*tan(1/2*a+1/2*x*b)^2+(-4*d^2*x-4*c*d)*tan(1/2*a+1/2*x*b)+4*b*(1/2*d*x+c
)*x*d))/b^3
Fricas [A] (verification not implemented)
none
Time = 0.27 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.89
\[
\int (c+d x)^2 \cot (a+b x) \csc ^2(a+b x) \, dx=\frac {b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} + 2 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 2 \, {\left (d^{2} \cos \left (b x + a\right )^{2} - d^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (b x + a\right )\right )}{2 \, {\left (b^{3} \cos \left (b x + a\right )^{2} - b^{3}\right )}}
\]
[In]
integrate((d*x+c)^2*cos(b*x+a)*csc(b*x+a)^3,x, algorithm="fricas")
[Out]
1/2*(b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2 + 2*(b*d^2*x + b*c*d)*cos(b*x + a)*sin(b*x + a) + 2*(d^2*cos(b*x + a)
^2 - d^2)*log(1/2*sin(b*x + a)))/(b^3*cos(b*x + a)^2 - b^3)
Sympy [F]
\[
\int (c+d x)^2 \cot (a+b x) \csc ^2(a+b x) \, dx=\int \left (c + d x\right )^{2} \cos {\left (a + b x \right )} \csc ^{3}{\left (a + b x \right )}\, dx
\]
[In]
integrate((d*x+c)**2*cos(b*x+a)*csc(b*x+a)**3,x)
[Out]
Integral((c + d*x)**2*cos(a + b*x)*csc(a + b*x)**3, x)
Maxima [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 1130 vs. \(2 (52) = 104\).
Time = 0.29 (sec) , antiderivative size = 1130, normalized size of antiderivative = 20.93
\[
\int (c+d x)^2 \cot (a+b x) \csc ^2(a+b x) \, dx=\text {Too large to display}
\]
[In]
integrate((d*x+c)^2*cos(b*x+a)*csc(b*x+a)^3,x, algorithm="maxima")
[Out]
1/2*(4*(4*(b*x + a)*cos(2*b*x + 2*a)^2 + 4*(b*x + a)*sin(2*b*x + 2*a)^2 - (2*(b*x + a)*cos(2*b*x + 2*a) + sin(
2*b*x + 2*a))*cos(4*b*x + 4*a) - 2*(b*x + a)*cos(2*b*x + 2*a) - (2*(b*x + a)*sin(2*b*x + 2*a) - cos(2*b*x + 2*
a) + 1)*sin(4*b*x + 4*a) + sin(2*b*x + 2*a))*c*d/((2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a) - cos(4*b*x + 4
*a)^2 - 4*cos(2*b*x + 2*a)^2 - sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*sin(2*b*x + 2*a)^2
+ 4*cos(2*b*x + 2*a) - 1)*b) - 4*(4*(b*x + a)*cos(2*b*x + 2*a)^2 + 4*(b*x + a)*sin(2*b*x + 2*a)^2 - (2*(b*x +
a)*cos(2*b*x + 2*a) + sin(2*b*x + 2*a))*cos(4*b*x + 4*a) - 2*(b*x + a)*cos(2*b*x + 2*a) - (2*(b*x + a)*sin(2*
b*x + 2*a) - cos(2*b*x + 2*a) + 1)*sin(4*b*x + 4*a) + sin(2*b*x + 2*a))*a*d^2/((2*(2*cos(2*b*x + 2*a) - 1)*cos
(4*b*x + 4*a) - cos(4*b*x + 4*a)^2 - 4*cos(2*b*x + 2*a)^2 - sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x
+ 2*a) - 4*sin(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a) - 1)*b^2) + (8*(b*x + a)^2*cos(2*b*x + 2*a)^2 + 8*(b*x + a)
^2*sin(2*b*x + 2*a)^2 - 4*(b*x + a)^2*cos(2*b*x + 2*a) - 4*((b*x + a)^2*cos(2*b*x + 2*a) + (b*x + a)*sin(2*b*x
+ 2*a))*cos(4*b*x + 4*a) + (2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a) - cos(4*b*x + 4*a)^2 - 4*cos(2*b*x +
2*a)^2 - sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*sin(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a)
- 1)*log(cos(b*x + a)^2 + sin(b*x + a)^2 + 2*cos(b*x + a) + 1) + (2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a)
- cos(4*b*x + 4*a)^2 - 4*cos(2*b*x + 2*a)^2 - sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*sin
(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a) - 1)*log(cos(b*x + a)^2 + sin(b*x + a)^2 - 2*cos(b*x + a) + 1) - 4*((b*x
+ a)^2*sin(2*b*x + 2*a) + b*x - (b*x + a)*cos(2*b*x + 2*a) + a)*sin(4*b*x + 4*a) + 4*(b*x + a)*sin(2*b*x + 2*a
))*d^2/((2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a) - cos(4*b*x + 4*a)^2 - 4*cos(2*b*x + 2*a)^2 - sin(4*b*x +
4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*sin(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a) - 1)*b^2) - c^2/sin(
b*x + a)^2 + 2*a*c*d/(b*sin(b*x + a)^2) - a^2*d^2/(b^2*sin(b*x + a)^2))/b
Giac [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 2978 vs. \(2 (52) = 104\).
Time = 1.21 (sec) , antiderivative size = 2978, normalized size of antiderivative = 55.15
\[
\int (c+d x)^2 \cot (a+b x) \csc ^2(a+b x) \, dx=\text {Too large to display}
\]
[In]
integrate((d*x+c)^2*cos(b*x+a)*csc(b*x+a)^3,x, algorithm="giac")
[Out]
-1/8*(b^2*d^2*x^2*tan(1/2*b*x)^4*tan(1/2*a)^4 + 2*b^2*c*d*x*tan(1/2*b*x)^4*tan(1/2*a)^4 + 2*b^2*d^2*x^2*tan(1/
2*b*x)^4*tan(1/2*a)^2 + 2*b^2*d^2*x^2*tan(1/2*b*x)^2*tan(1/2*a)^4 + b^2*c^2*tan(1/2*b*x)^4*tan(1/2*a)^4 + 4*b^
2*c*d*x*tan(1/2*b*x)^4*tan(1/2*a)^2 - 4*b*d^2*x*tan(1/2*b*x)^4*tan(1/2*a)^3 + 4*b^2*c*d*x*tan(1/2*b*x)^2*tan(1
/2*a)^4 - 4*b*d^2*x*tan(1/2*b*x)^3*tan(1/2*a)^4 + b^2*d^2*x^2*tan(1/2*b*x)^4 + 4*b^2*d^2*x^2*tan(1/2*b*x)^2*ta
n(1/2*a)^2 + 2*b^2*c^2*tan(1/2*b*x)^4*tan(1/2*a)^2 - 4*b*c*d*tan(1/2*b*x)^4*tan(1/2*a)^3 + b^2*d^2*x^2*tan(1/2
*a)^4 + 2*b^2*c^2*tan(1/2*b*x)^2*tan(1/2*a)^4 - 4*b*c*d*tan(1/2*b*x)^3*tan(1/2*a)^4 + 2*b^2*c*d*x*tan(1/2*b*x)
^4 + 4*b*d^2*x*tan(1/2*b*x)^4*tan(1/2*a) + 8*b^2*c*d*x*tan(1/2*b*x)^2*tan(1/2*a)^2 + 24*b*d^2*x*tan(1/2*b*x)^3
*tan(1/2*a)^2 - 4*d^2*log(16*(tan(1/2*b*x)^4*tan(1/2*a)^2 + 2*tan(1/2*b*x)^3*tan(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a)^2)/(tan(1/2*b*
x)^4*tan(1/2*a)^4 + 2*tan(1/2*b*x)^4*tan(1/2*a)^2 + 2*tan(1/2*b*x)^2*tan(1/2*a)^4 + tan(1/2*b*x)^4 + 4*tan(1/2
*b*x)^2*tan(1/2*a)^2 + tan(1/2*a)^4 + 2*tan(1/2*b*x)^2 + 2*tan(1/2*a)^2 + 1))*tan(1/2*b*x)*tan(1/2*a) - 4*d^2*
log(16*(tan(1/2*b*x)^4*tan(1/2*a)^2 + 2*tan(1/2*b*x)^3*tan(1/2*a)^3 + tan(1/2*b*x)^2*tan(1/2*a)^4 - 2*tan(1/2*
b*x)^3*tan(1/2*a) - 4*tan(1/2*b*x)^2*tan(1/2*a)^2 - 2*tan(1/2*b*x)*tan(1/2*a)^3 + tan(1/2*b*x)^2 + 2*tan(1/2*b
*x)*tan(1/2*a) + tan(1/2*a)^2)/(tan(1/2*b*x)^4*tan(1/2*a)^4 + 2*tan(1/2*b*x)^4*tan(1/2*a)^2 + 2*tan(1/2*b*x)^2
*tan(1/2*a)^4 + tan(1/2*b*x)^4 + 4*tan(1/2*b*x)^2*tan(1/2*a)^2 + tan(1/2*a)^4 + 2*tan(1/2*b*x)^2 + 2*tan(1/2*a
)^2 + 1))*tan(1/2*a)^2 + b^2*c^2 + 4*b*c*d*tan(1/2*b*x) + 4*b*c*d*tan(1/2*a))/(b^3*tan(1/2*b*x)^4*tan(1/2*a)^2
+ 2*b^3*tan(1/2*b*x)^3*tan(1/2*a)^3 + b^3*tan(1/2*b*x)^2*tan(1/2*a)^4 - 2*b^3*tan(1/2*b*x)^3*tan(1/2*a) - 4*b
^3*tan(1/2*b*x)^2*tan(1/2*a)^2 - 2*b^3*tan(1/2*b*x)*tan(1/2*a)^3 + b^3*tan(1/2*b*x)^2 + 2*b^3*tan(1/2*b*x)*tan
(1/2*a) + b^3*tan(1/2*a)^2)
Mupad [B] (verification not implemented)
Time = 25.39 (sec) , antiderivative size = 147, normalized size of antiderivative = 2.72
\[
\int (c+d x)^2 \cot (a+b x) \csc ^2(a+b x) \, dx=\frac {\frac {{\left (c+d\,x\right )}^2}{b}+\frac {{\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}\,{\left (c+d\,x\right )}^2}{b}}{1+{\mathrm {e}}^{a\,4{}\mathrm {i}+b\,x\,4{}\mathrm {i}}-2\,{\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}}-\frac {d^2\,x\,2{}\mathrm {i}}{b^2}+\frac {b\,c^2+2\,b\,c\,d\,x-c\,d\,2{}\mathrm {i}+b\,d^2\,x^2-d^2\,x\,2{}\mathrm {i}}{b^2\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}-1\right )}+\frac {d^2\,\ln \left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}-1\right )}{b^3}
\]
[In]
int((cos(a + b*x)*(c + d*x)^2)/sin(a + b*x)^3,x)
[Out]
((c + d*x)^2/b + (exp(a*2i + b*x*2i)*(c + d*x)^2)/b)/(exp(a*4i + b*x*4i) - 2*exp(a*2i + b*x*2i) + 1) - (d^2*x*
2i)/b^2 + (b*c^2 - c*d*2i - d^2*x*2i + b*d^2*x^2 + 2*b*c*d*x)/(b^2*(exp(a*2i + b*x*2i) - 1)) + (d^2*log(exp(a*
2i)*exp(b*x*2i) - 1))/b^3